﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace DTO
{
    public class Security
    {
        private int _ID;

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        private int _Module;

        public int Module
        {
            get { return _Module; }
            set { _Module = value; }
        }
        private int _Function;

        public int Function
        {
            get { return _Function; }
            set { _Function = value; }
        }
        private int _Action;

        public int Action
        {
            get { return _Action; }
            set { _Action = value; }
        }
        private int _Permission;

        public int Permission
        {
            get { return _Permission; }
            set { _Permission = value; }
        }
        private int _Address;

        public int Address
        {
            get { return _Address; }
            set { _Address = value; }
        }
        public static DataTable ToDataTable()
        {
            DataTable dt = new DataTable("Security");
            dt.Columns.AddRange(new DataColumn[] { new DataColumn("ID")
            ,new DataColumn("Module")
            ,new DataColumn("Function")
            ,new DataColumn("Action")
            ,new DataColumn("Permission")
            ,new DataColumn("Address")
            });
            dt.PrimaryKey = new DataColumn[] { dt.Columns["ID"] };
            return dt;
        }
    }
}